<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
                   
class Gallery extends CI_Controller {

	 
 
           
	public function index(){	
		
		if( $this->input->cookie('mt_client')){
		        /* if existing n ung cookie */	
					 
		}else{ 			
			/* else initialize model usersession */
			$this->usersession->putSessionCookie(); 						  
		}	
	
		$data['devices'] = $this->device->getDevices(); 
		//$data['devices'] = $this->getDevices();
		//print_r($data['devices'] );die();
		$views['_content'] = 'phonegallery';
		$this->template->load('template_landing', $views,  $data);
		//print_r($data);  

	} 
	public function filterby($range){
		/* switch case   */
		/* 0 - 2000  case 1 */
		/* 2001 - 3000 case 2 */

	}

	private function loadDevices(){
		/*   or Are we going to load all device details and order / filterprices / loadmore thru js or operate and load devices     */
	 	/*   temporarily  call testSMS/MaitaiDynamicContent/getDevices  */
		
	}

	public function orderBy(){
			
		
	}

	public function addtoCart(){
		
	
	}
	public function sessionCookie(){
		 
		$cookie = array(
    			'name'   => 'mt_client',
    			'value'  => $this->session->userdata('session_id'),
    			'expire' => '86500',
			    'path'   => '/',
  			    'secure' => False
		);
		
		$this->input->set_cookie($cookie);
	 
	}
	
	/* * * * * * * * * * * *
	*    
	*  temporary functions
	*  fake hessian functions
	*
	* * * * * * * * * * * * */
	 
	public function getDevices()
	{
	  	 
	 	 	$dv = array( 
				"2"=> array("Name"=> "A_iPhone5c32","Sku"=>"cloudfone501d","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"3"=> array("Name"=> "A_Samsung Galaxy S4","Sku"=>"nokia-asha-501","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean", "img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"4"=> array("Name"=> "B_iPhone5s16","Sku"=>"galaxy-s4-white-postpaid","Brand"=> "Apple","Price"=> "Php 3000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"5"=> array("Name"=> "CiPhone5c32a","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 5000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7","img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"6"=> array("Name"=> "Nokia Lumia 625","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
				"7"=> array("Name"=> "Samsung Galaxy Note II LTE","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean","img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"8"=> array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7", "img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"  ),
				"9"=> array("Name"=> "iPhone5c32","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"10"=> array("Name"=> "Samsung Galaxy S4","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean", "img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"11"=> array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 3000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"12"=> array("Name"=> "iPhone5c32a","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 5000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7","img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"13"=>	array("Name"=> "Nokia Lumia 625","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
				"14"=>	array("Name"=> "Samsung Galaxy Note II LTE","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean","img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"15"=>	array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7", "img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"  ),				
				"16"=>	array("Name"=> "Nokia Lumia 627","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 6000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
				"17"=>	array("Name"=> "Samsung Galaxy S4","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean", "img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"18"=>	array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 3000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"19"=>  array("Name"=> "iPhone5c32a","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 5000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7","img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"20"=>	array("Name"=> "Nokia Lumia 625","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
				"21"=>	array("Name"=> "Samsung Galaxy Note II LTE","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean","img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"22"=>	array("Name"=> "B_iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7", "img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"  ),
				"23"=>	array("Name"=> "A_iPhone5c32","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"24"=>	array("Name"=> "Samsung Galaxy S4","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean", "img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"25"=>	array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 1000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7" ,"img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"26"=>	array("Name"=> "iPhone5c32a","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 1000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7","img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"   ),
				"27"=>	array("Name"=> "Nokia Lumia 625","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
				"28"=>	array("Name"=> "Samsung Galaxy Note II LTE","Sku"=>"cloudfone501ds","Brand"=> "Samsung","Price"=> "Php 15000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Android Jellybean","img" => "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/s/a/samsungs4_back_postpaid_3_1.png"  ), 
				"29"=>	array("Name"=> "iPhone5s16","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 20000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "iOS7", "img"=> "2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/i/p/iphone5_white_16gb_violated_1.png"  ),				
				"30"=>	array("Name"=> "Nokia Lumia 627","Sku"=>"cloudfone501ds","Brand"=> "Apple","Price"=> "Php 6000.00" , "Dimensions"=> "123.8 x 58.6 x 7.6 mm", "Weight"=> "112.00g" , "Qwerty" => "No", "Size"=> "4 inches" ,  "OS"=> "Nokia", "img" =>"2/small_image/200x/9df78eab33525d08d6e5fb8d27136e95/3/5/350x350_nokia_625_2.png" ),
			);	
		 	 
			return $dv; 
	 	}
	  
 

	
}
